import axios from '@/utils/request.js'

// 模拟面试筛选条件
function apiGetFilters () {
  return axios({
    url: '/interview/filters'
  })
}

// 获取模拟面试题接口
function apiGetQuestions ({ type, city }) {
  return axios({
    url: '/interview/questions',
    params: {
      type,
      city
    },
    needToken: true
  })
}
// 提交试题接口
function apiSubmit ({ id, singleAnswer, multipleAnswer }) {
  return axios({
    url: '/questions/submit',
    data: {
      id,
      singleAnswer,
      multipleAnswer
    },
    method: 'post',
    needToken: true
  })
}
// 面试题详情接口
function apiGetQueInfo (id) {
  return axios({
    url: `/questions/${id}`,
    needToken: true
  })
}
export { apiGetFilters, apiGetQuestions, apiSubmit, apiGetQueInfo }
